package com.graduationdesign.zengyan.graduationdesignapp.ui.base.errorhandle;

import android.content.Context;

import com.graduationdesign.zengyan.graduationdesignapp.utils.ToastUtils;

/**
 * Created by ZengYan on 2018/4/21.
 *
 * @desc :
 */
public class CommonErrorView implements BaseErrorView {

    private final Context context;
    private ErrorCallBack mErrorCallBack;

    public CommonErrorView(Context context) {
        this.context = context;
    }

    @Override
    public void showError(Throwable throwable) {
        ToastUtils.showDefaultError(context, throwable);
    }

    @Override
    public void showNetWorkError(Throwable throwable) {
        ToastUtils.showNetError(context, throwable);
    }

    @Override
    public void showServerError(ServerException e) {
        ToastUtils.showServerError(context, e);
    }
}
